package com.pactera.asmp.server.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;

import com.pactera.asmp.server.entity.UserProjectStatisticsDataDTO;
import com.pactera.asmp.server.pojo.UserProject;
import com.pactera.asmp.server.pojo.UserProjectKey;

/**
 * @ProjectName: asmpserver
 * @Package: com.pactera.asmp.server.dao
 * @ClassName: UserProjecMapper
 * @Author: lvzhiqiang
 * @Description: 用户和项目关系Mapper
 * @Date: 2019/8/9 15:20
 * @Version: 1.0
 */
@Mapper
public interface UserProjectMapper {

    int deleteByPrimaryKey(UserProjectKey key);

    int insert(UserProject record);

    int insertSelective(UserProject record);

    List<UserProject> findByUserId(Integer userId);

    int batchInsert(List<UserProject> list);

    List<UserProject> querySelective(UserProject record);

    /**
     * 批量删除
     * @param list
     * @param projectId
     * @return
     */
    int deleteByPrimaryKeys(List<Integer> list, Integer projectId);

    List<UserProjectStatisticsDataDTO> summaryTestUserByProjectId();

    List<UserProjectStatisticsDataDTO> summaryUserByProjectIdAndRoleName();
}
